package com.power.sifa.approve.model.enumeration;

import lombok.Getter;

/**
 * @ClassName Tp_stageEnum
 * @Author xiongzw
 * @Date 2023/9/27 19:18
 * @Description
 * @Version: 1.0
 **/
@Getter
public enum Tp_stageEnum {

    /**
     * 受理阶段
     */
    ACCEPT("ACCEPT", 6005000, "受理阶段"),
    /**
     * 审理阶段
     */
    HEAR("HEAR", 6005001, "审理阶段"),
    /**
     * 决定阶段
     */
    DECISION("DECISION", 6005002, "决定阶段"),
    /**
     * 执行阶段
     */
    EXECUTE("EXECUTE", 6005003, "执行阶段");


    private String key;

    private Integer id;

    private String name;

    Tp_stageEnum(String key, Integer id, String name) {
        this.key = key;
        this.id = id;
        this.name = name;
    }

    public static Tp_stageEnum getById(Integer id) {
        Tp_stageEnum[] stageEnums = Tp_stageEnum.values();
        for (Tp_stageEnum stageEnum : stageEnums) {
            if (stageEnum.getId().equals(id)) {
                return stageEnum;
            }
        }
        return null;
    }
}
